package com.zhaozhaonews.search.controller.v1;


import com.zhaozhaonews.model.common.dto.ResponseResult;
import com.zhaozhaonews.model.serach.dto.HistorySearchDto;
import com.zhaozhaonews.search.service.ApUserSearchService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author WanJl
 * @version 1.0
 * @title ApUserSearchController
 * @description
 * @create 2025/2/22
 */
@Slf4j
@RestController
@RequestMapping("/api/v1/history")
public class ApUserSearchController {

    @Resource
    private ApUserSearchService apUserSearchService;

    @PostMapping("/load")
    public ResponseResult findUserSearch(){
        return apUserSearchService.findUserSearch();
    }
    @PostMapping("/del")
    public ResponseResult delUserSearch(@RequestBody HistorySearchDto dto){
        return apUserSearchService.delUserSearch(dto);
    }

}
